#ifndef CAMERA_H
#define CAMERA_H

/*!
 * \file camera.h
 * \brief Header of class CCamera
 * \author Benjamin Toueg
 * \version 20.05.09
 */

#include "vector3.h"

/*! \class CCamera
* \brief Make the use of gluLookAt easier
*/
class CCamera
{
public:
    /*! \brief Custom constructor */
    CCamera(const Vector3d& eye = Vector3d(), const Vector3d& center = Vector3d(), const Vector3d& up = Vector3d());
    void                camLookAt           () const;
    void                changeEyeColatitude (const double& deltaPhi);
    void                changeEyeLatitude   (const double& deltaTheta);
    void                dollyWith           (const Vector3d& new_center);
    const Vector3d&     getEye              () const { return m_Eye; };
    const Vector3d&     getCenter           () const { return m_Center; };
    const Vector3d&     getUp               () const { return m_Up; };
    void                setCenter           (const Vector3d& new_center) { m_Center = new_center; };
    void                zoom                (const double& percentage);
private:
    Vector3d m_Eye;       /*!< Eye position in gluLookAt*/
    Vector3d m_Center;    /*!< Center position in gluLookAt*/
    Vector3d m_Up;        /*!< Orientation in gluLookAt*/
};

#endif //CAMERA_H
